
import Vue from 'vue'
import Router from 'vue-router'
 
// 导入页面组件
import Index from '@/views/index.vue'
import Powder from '@/views/powder.vue'
 
Vue.use(Router)
 
const routes = [
  {
    path: '/',
    name: 'index',
    component: Index
  },
  {
    path: '/powder',
    name: 'powder',
    component: Powder
  }
]
 
const router = new Router({
  base: '/',
  mode: 'history',
  scrollBehavior: () => ({ y: 0 }),
  routes
})

export default router